#ifndef INIMANAGER_H
#define INIMANAGER_H

#include <QObject>

class iniManager : public QObject
{
    Q_OBJECT
public:
    explicit iniManager(const QString &filePath, QObject *parent = nullptr);

signals:

public:
    QVariant readValue(const QString &group, const QString &key) const;
    void writeValue(const QString &group, const QString &key, const QVariant &value);
    void addGroup(const QString &group, const QVariantMap &keyValues);
    void removeGroup(const QString &group);
    void removeValue(const QString &group, const QString &key);
    QStringList allGroups() const;
    QStringList allKeys(const QString &group) const;
    static QStringList splitString(const QString &input);
    QString getGroupIdQString(const uint16_t id, const uint16_t l, const uint16_t w, const uint16_t h, const QString type);
    bool isExists(const QString &key, const QVariant &value) const;
    static QString getGroupType(const QString &type);
private:
    QString m_filePath;

};

#endif // INIMANAGER_H
